<?php

class Authorization
{
    /**
     * Action preDispatch
     * @param Route $route
     * @return Route
     */
    public function preDispatch($route)
    {
     return $route;
    }
    
    /**
     * Retorna a lista de permissoes
     * @param string $authzType
     * @param int $userId
     * @return array
     */
    public static function getPermissionList($authzType,$userId)
    {
        $class = 'UserAuthz' . ucfirst($authzType);
        $objAuth = new $class();
        return $objAuth->getPermissionList($userId);
    }
    
    /**
     * Salva a lista de permissoes em sessao
     * @param array $list
     */
    public static function savePermissonList($list)
    {
        
    }
    
    /**
     * Limpa a lista de permissoes da sessao
     */
    public static function clearPermissonList()
    {
        
    }
    
    /**
     * Salva a lista de permissoes em sessao
     * @param Route $route
     * @param array $listPermission
     * @return boolean
     */
    public static function checkRoutePermisson($list)
    {
        
    }
    
    
    
}

